<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p>这是workman测试</p>
</body>
<script>
    ws = new WebSocket("ws://www.tprabc.com:2346");

    ws.onopen = function() {
//        alert("连接成功");
        ws.send('tom');
//        alert("给服务端发送一个字符串：tom");
        ws.send('洞怪，洞怪，我是东窑');
    };

    ws.onmessage = function(e) {
        alert("收到服务端的消息：" + e.data);
    };

</script>
</html>